home *** CD-ROM | disk | FTP | other *** search
/ Delphi 2 - Developers' Solutions / Delphi 2 Developers' Solutions.iso / dds / comps / goodies / delphi10 / unixfmgr / unixfmgr.pas < prev   
Encoding:
Pascal/Delphi Source File  |  1996-06-18  |  1.8 KB  |  70 lines

  1. unit Unixfmgr;
  2.  
  3. interface
  4.  
  5. uses
  6.   SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls,
  7.   Forms, Dialogs, UFMGR34;
  8.  
  9. type
  10.   TUnixFileManagerForm = class(TComponent)
  11.   private
  12.     { Private declarations }
  13.     TheForm       : TCCFileMgrForm;
  14.     FOnCreate     : TNotifyEvent;
  15.     FOnDestroy    : TNotifyEvent;
  16.     FOnShow       : TNotifyEvent;
  17.     FTop          : Integer;
  18.     FLeft         : Integer;
  19.   protected
  20.     { Protected declarations }
  21.   public
  22.     { Public declarations }
  23.     constructor Create( AOwner : TComponent ); override;
  24.     destructor Destroy; override;
  25.     procedure Show;
  26.   published
  27.     { Published declarations }
  28.     property Top : Integer read FTop write FTop;
  29.     property Left : Integer read FLeft write FLeft;
  30.     property OnCreate : TNotifyEvent read FOnCreate write FOnCreate;
  31.     property OnDestroy : TNotifyEvent read FOnDestroy write FOnDestroy;
  32.     property OnShow : TNotifyEvent read FOnShow write FOnShow;
  33.   end;
  34.  
  35. procedure Register;
  36.  
  37. implementation
  38.  
  39. constructor TUnixFileManagerForm.Create( AOwner : TComponent );
  40. begin
  41.   inherited Create( AOwner );
  42.   TheForm := TCCFileMgrForm.Create( Application.MainForm );
  43.   TheForm.Visible := false;
  44.   if Assigned( FOnCreate ) then OnCreate( Self );
  45. end;
  46.  
  47. destructor  TUnixFileManagerForm.Destroy;
  48. begin
  49.   if Assigned( FOnDestroy ) then OnDestroy( Self );
  50.   if Assigned( TheForm ) then TheForm.Close;
  51.   inherited Destroy;
  52. end;
  53.  
  54. procedure TUnixFileManagerForm.Show;
  55. begin
  56.   if Assigned( FOnShow ) then OnShow( Self );
  57.   TheForm.Position := poDesigned;
  58.   TheForm.Top := Top;
  59.   TheForm.Left := Left;
  60.   TheForm.Visible := true;
  61.   TheForm.Show;
  62. end;
  63.  
  64. procedure Register;
  65. begin
  66.   RegisterComponents('Goodies', [TUnixFileManagerForm]);
  67. end;
  68.  
  69. end.
  70.